#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "producerthread.h"
#include "consumerthread.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void onResultReady(QString result);
    void on_stopButton_clicked();  // 添加按钮点击槽
private:
    Ui::MainWindow *ui;
    ProducerThread *m_producer;
    ConsumerThread *m_consumer;
};

#endif // MAINWINDOW_H
